package com.nit.lab.service.basic;

import com.alibaba.fastjson.JSONObject;
import com.nit.lab.dto.basic.UserDTO;
import com.nit.lab.dto.utils.TableReqDTO;
import com.nit.lab.dto.utils.TableRspDTO;
import org.apache.ibatis.annotations.Select;

import java.io.IOException;
import java.util.List;


public interface UserService {
    /**
     * @Description: 获取表格数据
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    TableRspDTO list4Table(TableReqDTO tableReqDTO) throws Exception;
//注释！
    /**
     * @Description: 新增记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer add(UserDTO userDTO) throws Exception;

    /**
     * @Description: 更新记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer update(UserDTO userDTO) throws Exception;

    /**
     * @Description: 删除记录
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer remove(String userIds) throws Exception;

    /**
     * @Description: 重置用户密码
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer resetPwd(Long userId, String loginPwd) throws Exception;

    /**
     * @Description: 登录验证
     * @Author: SN
     * @Date: 2019/01/30 18:15
     */
    UserDTO loginCheck(String loginName) throws Exception;

    /**
     * @Description: 根据UserId获取用户信息
     * @Author: SN
     * @Date: 2019/01/30 18:15
     */
    UserDTO getByUserId(Long userId) throws Exception;

    UserDTO getByUserName(String userName) throws Exception;
    /**
     * @Description: 更新用户状态
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    Integer updateUserType(Long userId) throws Exception;



    List<UserDTO> getUserListAll() throws Exception;

    /**
     * @Description: 处理用户请求
     * @Author: SN
     * @Date: 2019/01/31 11:02
     */
    JSONObject httpsRequest(String requestUrl, String requestMethod, String outputStr)throws Exception;


    /**
     * @Description:微信端的登录和注册
     * @Author: LYN
     * @Date: 2022/07/13
     */
    String sendPostJson(String url, String json) throws IOException ;


    JSONObject weiAdd(JSONObject weiuser) throws Exception;

     JSONObject getOpenId(String code) throws Exception;

    String getPhone(String code) throws  Exception;

    /**
     * @Description:微信端自动定时设置，获取token
     * @Author: LYN
     * @Date: 2022/07/13
     */
    void setTokenByTime()throws  Exception;

    String getweixinToken() throws Exception;

    /**
     * @Description: 判断是否有准考证号
     * @Author: LYN
     * @Date: 2022/07/12
     */
    String checkAdmiss(String checkAdmiss) throws Exception;

    /**
     * @Description: 根据准考证号返回姓名
     * @Author: LYN
     * @Date: 2022/07/12
     */
    String getCheckName(String checkAdmiss) throws Exception;

    /**
     * @Description: 根据准考证号返回学院
     * @Author: LYN
     * @Date: 2022/07/12
     */
    String getCheckUnit(String checkAdmiss) throws Exception;

    /**
     * @Description: 根据区块链号返回
     * @Author: LYN
     * @Date: 2022/07/17
     */
    JSONObject getCheckAddress(String userInfo) throws Exception;
}
